#include "CollisionListener.h"
#include "CollisionEvent.h"
#include "BaseObject.h"

//-------------------------------------------------------------------------------------
CollisionListener::CollisionListener(void)
{
}
//-------------------------------------------------------------------------------------
CollisionListener::~CollisionListener(void)
{
}
//-------------------------------------------------------------------------------------
bool CollisionListener::handleEvent(IGameEvent const &event)
{
	const CollisionEvent &evt = static_cast<const CollisionEvent&>(event);
	btVector3 point = evt.mCollisionPoint;
	evt.mpBaseObject0->collision(evt.mpBaseObject1, point);
	evt.mpBaseObject1->collision(evt.mpBaseObject0, point);
	return true;
}